package org.lgiavedoni.android.franq.core.cron;

import java.util.TimerTask;

import org.lgiavedoni.android.franq.util.date.DateUtil;

public abstract class CronTask extends TimerTask {

	public abstract long getDelay();

	public String getScheduleExecutionTimeFormated() {
		return DateUtil.parseDateTime(scheduledExecutionTime());
	}

	@Override
	public String toString() {
		return "CronTask [Class: " + this.getClass().getSimpleName() + ", Execution time: " + getScheduleExecutionTimeFormated() + "]";
	}

}
